<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>对象语法</title>
</head>
<body>

<div id="app">
  <div :style="{color: color, fontSize: fontSize + 'px'}">style对象语法</div>
  <button @click="bigger">字号变大</button>
</div>

<script src="../lib/vue.js"></script>
<script>
  let vm = new Vue({
    el: '#app',
    data: {
      color: 'red',
      fontSize: 10
    },
    methods: {
      bigger() {
        this.fontSize = this.fontSize + 5
      }
    }
  })
</script>

</body>
</html>